package client.abilities.ActivatedAbilities;

import client.BattleManager;
import client.MagicColor;
import client.ManaPool;
import client.TimedEffect;
import client.abilities.CreatureAbility;

public class AttackBoost extends CreatureAbility implements TimedEffect {

    private static final long serialVersionUID = 1L;

    public AttackBoost(int tier) {
        this.tier = tier;
        name = "Attack Boost";
        manaCost = new ManaPool();
        manaCost.setColor(MagicColor.RED, 3);
        //description = "Increases strength by 2 for one turn.";
    }

    @Override
    public boolean use(BattleManager battle) {
        boolean used = false;
        if (battle.getPlayer().getManaPool().comparePool(manaCost)) {
            setStrengthBoost(2 * tier);
            setTurns(1);
            battle.getPlayer().getActiveCreature().addEffect(this);
            battle.getPlayer().getManaPool().subtractPool(manaCost);
            battle.incrementSpellsUsed();
            used = true;
        }
        return used;
    }

    @Override
    public void onEnterBattle(BattleManager battle) {
    }

    @Override
    public void setAccuracyBoost(int newAccuracy) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void setTurns(int turns) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void setStrengthBoost(int newStrength) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public int getStrengthBoost() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public int getTurns() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void addTurns(int turns) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void subtractTurns(int turns) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
